import { Menu } from 'antd';
import Link from 'umi/link';

function Header({ location }) {
  return (
    <Menu selectedKeys={[location.pathname]} mode="horizontal" >
      <Menu theme="dark" >
        <Menu.Item key="/">
          <Link to="/">首页</Link>
        </Menu.Item>
        <Menu.Item key="/todolist">
          <Link to="/todolist">ToDo List</Link>
        </Menu.Item>
        <Menu.Item key="/users">
          <Link to="/users">用户管理</Link>
        </Menu.Item>
        <Menu.Item key="/test">
          <Link to="/test">文件路由功能示意</Link>
        </Menu.Item>
      </Menu>
    </Menu>
  );
}

export default Header;
